<?php
/**
 * 云打印平台，快递员关联
 * @author lss
 * 2017-08-14
 */
namespace soa\mp\cloudPrint;

use soa\client;

class agentWaybillSource  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//设置单号来源
	public function set($agentGuid,$source,$info,$extra = []){
		return $this->post("api/cloudPrint/agentWaybillSource/set",compact('agentGuid','source','info','extra'));
	}

	//删除单号来源
	public function del($agentGuid,$source){
		return $this->post("api/cloudPrint/agentWaybillSource/del",compact('agentGuid','source'));
	}

	//获取设置的单号来源
	public function getALLSources($agentGuid,$orderBy = "weight ASC"){
		return $this->post("api/cloudPrint/agentWaybillSource/getALLSources",compact('agentGuid','orderBy'));
	}

	//获取单一单号来源的设置
	public function getBySource($agentGuid,$source){
		return $this->post("api/cloudPrint/agentWaybillSource/getBySource",compact('agentGuid','source'));
	}
}